package org.pdai.basic.generics;

public class GenericsDemo09 {
    public static void main(String[] args) {
        Notepad<String, Integer> t = new Notepad<>();
        t.setKey("Tom");
        t.setValue(20);
        System.out.println("key=" + t.getKey() + "，value=" + t.getValue());
    }
}

class Notepad<K, V> {
    private K key;
    private V value;

    public K getKey() {
        return this.key;
    }

    public V getValue() {
        return this.value;
    }

    public void setKey(K key) {
        this.key = key;
    }

    public void setValue(V value) {
        this.value = value;
    }
}